package com.scy.utils;

import com.scy.entity.User;

/**
 * 本类用来演示
 *
 * @author wwh
 * @date 2024/7/5 14:01 $
 */
public class UserThreadLocal {

    private UserThreadLocal(){}

    private static final ThreadLocal<User> LOCAL = new ThreadLocal<>();

    public static void put(User User){
        LOCAL.set(User);
    }
    public static User get(){
        return LOCAL.get();
    }
    public static void remove(){
        LOCAL.remove();
    }
}